package com.lamp.JsonClass;

import java.util.List;


public class FriendStatus {
	private int statusCode;
	private int total;
	private List<FriendList> friendList;

	public int getStatusCode() {
		return this.statusCode;
	}

	public int getTotal() {
		return this.total;
	}

	public List<FriendList> getFriendList() {
		return this.friendList;
	}

	public void setStatusCode(int statusCode) {
		this.statusCode = statusCode;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public void setFriendList(List<FriendList> friendList) {
		this.friendList = friendList;
	}

	public void removeFriends(int userId) {
		for (FriendList k : friendList) {
			if (k.getUserId() == userId) {
				friendList.remove(k);
				break;
			}

		}
	}

	public String getUserName(int userId) {
		for (FriendList list : friendList) {
			int uId = list.getUserId();
			if (userId == uId)
				return list.getUserName();
		}
		return null;
	}

	public void addFriends(FriendList friend) {
		friendList.add(0, friend);
	}
}
